package com.ruoyi.cems.service.impl;


import com.ruoyi.cems.domain.BmsUserMessage;
import com.ruoyi.cems.mapper.BmsUserMessageMapper;
import com.ruoyi.cems.service.IBmsUserMessageService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Slf4j
@Service
public class BmsUserMessageServiceImpl implements IBmsUserMessageService {

    @Autowired
    private BmsUserMessageMapper bmsUserMessageMapper;
    /**
     * 根据ID查询消息
     *
     * @param ID
     * @return
     */
    @Override
    public BmsUserMessage selectBmsUserMessageByID(String ID) {
        return bmsUserMessageMapper.selectBmsUserMessageByID(ID);
    }

    /**
     * 查询消息列表
     *
     * @param bmsUserMessage
     * @return
     */
    @Override
    public List<BmsUserMessage> selectBmsUserMessageList(BmsUserMessage bmsUserMessage) {
        return bmsUserMessageMapper.selectBmsUserMessageList(bmsUserMessage);
    }

    /**
     * 新增消息
     *
     * @param bmsUserMessage
     * @return
     */
    @Override
    public int insertBmsUserMessage(BmsUserMessage bmsUserMessage) {
        return bmsUserMessageMapper.insertBmsUserMessage(bmsUserMessage);
    }

    /**
     * 修改消息
     *
     * @param bmsUserMessage
     * @return
     */
    @Override
    public int updateBmsUserMessage(BmsUserMessage bmsUserMessage) {
        return bmsUserMessageMapper.updateBmsUserMessage(bmsUserMessage);
    }

    /**
     * 更新消息状态
     *
     * @param enId
     * @param vcId
     * @return
     */
    @Override
    public int updateBmsUserMessageStatus(String enId, String vcId) {
        return bmsUserMessageMapper.updateBmsUserMessageStatus(enId, vcId);
    }
}
